<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: videoSource Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classvideoSource.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classvideoSource-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">videoSource Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__util.html">Utilities Library (jetson-utils)</a> &raquo; <a class="el" href="group__video.html">Video Streaming</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> API is for capturing frames from video input devices such as MIPI CSI cameras, V4L2 cameras, video/images files from disk, directories containing a sequence of images, and from RTP/RTSP network video streams over UDP/IP.  
 <a href="classvideoSource.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="videoSource_8h_source.html">videoSource.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for videoSource:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classvideoSource.png" usemap="#videoSource_map" alt=""/>
  <map id="videoSource_map" name="videoSource_map">
<area href="classgstCamera.html" title="MIPI CSI and V4L2 camera capture using GStreamer and nvarguscamerasrc or v4l2src elements. " alt="gstCamera" shape="rect" coords="0,56,85,80"/>
<area href="classgstDecoder.html" title="Hardware-accelerated video decoder for Jetson using GStreamer. " alt="gstDecoder" shape="rect" coords="95,56,180,80"/>
<area href="classimageLoader.html" title="Load an image or set of images from disk into GPU memory. " alt="imageLoader" shape="rect" coords="190,56,275,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2cae1095df64b7c61de77935b77032bb"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a2cae1095df64b7c61de77935b77032bb">~videoSource</a> ()</td></tr>
<tr class="memdesc:a2cae1095df64b7c61de77935b77032bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy interface and release all resources.  <a href="#a2cae1095df64b7c61de77935b77032bb">More...</a><br /></td></tr>
<tr class="separator:a2cae1095df64b7c61de77935b77032bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a872a7d5353b1cd97d02eb403ef8b57eb"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a872a7d5353b1cd97d02eb403ef8b57eb"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb">Capture</a> (T **image, uint64_t timeout=UINT64_MAX)</td></tr>
<tr class="memdesc:a872a7d5353b1cd97d02eb403ef8b57eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Capture the next image from the video stream.  <a href="#a872a7d5353b1cd97d02eb403ef8b57eb">More...</a><br /></td></tr>
<tr class="separator:a872a7d5353b1cd97d02eb403ef8b57eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81bf11e5819d747eb9060a71e78fce75"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a81bf11e5819d747eb9060a71e78fce75">Capture</a> (void **image, <a class="el" href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a> format, uint64_t timeout=UINT64_MAX)=0</td></tr>
<tr class="memdesc:a81bf11e5819d747eb9060a71e78fce75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Capture the next image from the video stream.  <a href="#a81bf11e5819d747eb9060a71e78fce75">More...</a><br /></td></tr>
<tr class="separator:a81bf11e5819d747eb9060a71e78fce75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7907ba2392b6ea5f747409d1bfbc18b"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#aa7907ba2392b6ea5f747409d1bfbc18b">Open</a> ()</td></tr>
<tr class="memdesc:aa7907ba2392b6ea5f747409d1bfbc18b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Begin streaming the device.  <a href="#aa7907ba2392b6ea5f747409d1bfbc18b">More...</a><br /></td></tr>
<tr class="separator:aa7907ba2392b6ea5f747409d1bfbc18b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19ed8f98e4ce28462296b498804005ae"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a19ed8f98e4ce28462296b498804005ae">Close</a> ()</td></tr>
<tr class="memdesc:a19ed8f98e4ce28462296b498804005ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop streaming the device.  <a href="#a19ed8f98e4ce28462296b498804005ae">More...</a><br /></td></tr>
<tr class="separator:a19ed8f98e4ce28462296b498804005ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ce18fd4c3a8f934e7ec000f0d36b7e9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a0ce18fd4c3a8f934e7ec000f0d36b7e9">IsStreaming</a> () const</td></tr>
<tr class="memdesc:a0ce18fd4c3a8f934e7ec000f0d36b7e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the device is actively streaming or not.  <a href="#a0ce18fd4c3a8f934e7ec000f0d36b7e9">More...</a><br /></td></tr>
<tr class="separator:a0ce18fd4c3a8f934e7ec000f0d36b7e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17f0c43e832d4de85a014b3aa4265732"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a17f0c43e832d4de85a014b3aa4265732">GetWidth</a> () const</td></tr>
<tr class="memdesc:a17f0c43e832d4de85a014b3aa4265732"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the width of the stream, in pixels.  <a href="#a17f0c43e832d4de85a014b3aa4265732">More...</a><br /></td></tr>
<tr class="separator:a17f0c43e832d4de85a014b3aa4265732"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ca24054da683cae18b0bfad01dbf1d0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a6ca24054da683cae18b0bfad01dbf1d0">GetHeight</a> () const</td></tr>
<tr class="memdesc:a6ca24054da683cae18b0bfad01dbf1d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the height of the stream, in pixels.  <a href="#a6ca24054da683cae18b0bfad01dbf1d0">More...</a><br /></td></tr>
<tr class="separator:a6ca24054da683cae18b0bfad01dbf1d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e6ac667bd17a49cc94a6b16173a06ba"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a4e6ac667bd17a49cc94a6b16173a06ba">GetFrameRate</a> () const</td></tr>
<tr class="memdesc:a4e6ac667bd17a49cc94a6b16173a06ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the framerate, in Hz or FPS.  <a href="#a4e6ac667bd17a49cc94a6b16173a06ba">More...</a><br /></td></tr>
<tr class="separator:a4e6ac667bd17a49cc94a6b16173a06ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2052b0b41222c17e3d14964f10c3ffa6"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structURI.html">URI</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a2052b0b41222c17e3d14964f10c3ffa6">GetResource</a> () const</td></tr>
<tr class="memdesc:a2052b0b41222c17e3d14964f10c3ffa6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> of the stream.  <a href="#a2052b0b41222c17e3d14964f10c3ffa6">More...</a><br /></td></tr>
<tr class="separator:a2052b0b41222c17e3d14964f10c3ffa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d423829515c5c91d132f476213e22bd"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structvideoOptions.html">videoOptions</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a7d423829515c5c91d132f476213e22bd">GetOptions</a> () const</td></tr>
<tr class="memdesc:a7d423829515c5c91d132f476213e22bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the <a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> of the stream.  <a href="#a7d423829515c5c91d132f476213e22bd">More...</a><br /></td></tr>
<tr class="separator:a7d423829515c5c91d132f476213e22bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76f6f92cf40ad72e9d7f76538d583e37"><td class="memItemLeft" align="right" valign="top">virtual uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a76f6f92cf40ad72e9d7f76538d583e37">GetType</a> () const</td></tr>
<tr class="memdesc:a76f6f92cf40ad72e9d7f76538d583e37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the interface type of the stream.  <a href="#a76f6f92cf40ad72e9d7f76538d583e37">More...</a><br /></td></tr>
<tr class="separator:a76f6f92cf40ad72e9d7f76538d583e37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0883cf58cd0d8d0c05fb192a01250b7a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a0883cf58cd0d8d0c05fb192a01250b7a">IsType</a> (uint32_t type) const</td></tr>
<tr class="memdesc:a0883cf58cd0d8d0c05fb192a01250b7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if this stream is of a particular type.  <a href="#a0883cf58cd0d8d0c05fb192a01250b7a">More...</a><br /></td></tr>
<tr class="separator:a0883cf58cd0d8d0c05fb192a01250b7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3c1689db5baf2786099d2c0be075010"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ad3c1689db5baf2786099d2c0be075010"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classvideoSource.html#ad3c1689db5baf2786099d2c0be075010">IsType</a> () const</td></tr>
<tr class="memdesc:ad3c1689db5baf2786099d2c0be075010"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a this stream is of a particular type.  <a href="#ad3c1689db5baf2786099d2c0be075010">More...</a><br /></td></tr>
<tr class="separator:ad3c1689db5baf2786099d2c0be075010"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38909f4451ecdf3a2777aea3a088677e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a38909f4451ecdf3a2777aea3a088677e">TypeToStr</a> () const</td></tr>
<tr class="memdesc:a38909f4451ecdf3a2777aea3a088677e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert this stream's class type to string.  <a href="#a38909f4451ecdf3a2777aea3a088677e">More...</a><br /></td></tr>
<tr class="separator:a38909f4451ecdf3a2777aea3a088677e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aadf5947b119db934f02fefcd8ffe23ee"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classvideoSource.html">videoSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">Create</a> (const <a class="el" href="structvideoOptions.html">videoOptions</a> &amp;options)</td></tr>
<tr class="memdesc:aadf5947b119db934f02fefcd8ffe23ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a <a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> struct that's already been filled out.  <a href="#aadf5947b119db934f02fefcd8ffe23ee">More...</a><br /></td></tr>
<tr class="separator:aadf5947b119db934f02fefcd8ffe23ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac84b9d20c628c19e0463aca50ed2cdf9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classvideoSource.html">videoSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#ac84b9d20c628c19e0463aca50ed2cdf9">Create</a> (const char *<a class="el" href="structURI.html">URI</a>, const <a class="el" href="structvideoOptions.html">videoOptions</a> &amp;options=<a class="el" href="structvideoOptions.html">videoOptions</a>())</td></tr>
<tr class="memdesc:ac84b9d20c628c19e0463aca50ed2cdf9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> string and optional <a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a>.  <a href="#ac84b9d20c628c19e0463aca50ed2cdf9">More...</a><br /></td></tr>
<tr class="separator:ac84b9d20c628c19e0463aca50ed2cdf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17577a0ed75a86cea8e579f4405a2942"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classvideoSource.html">videoSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a17577a0ed75a86cea8e579f4405a2942">Create</a> (const char *<a class="el" href="structURI.html">URI</a>, const <a class="el" href="classcommandLine.html">commandLine</a> &amp;cmdLine)</td></tr>
<tr class="memdesc:a17577a0ed75a86cea8e579f4405a2942"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> string and parsing command line arguments.  <a href="#a17577a0ed75a86cea8e579f4405a2942">More...</a><br /></td></tr>
<tr class="separator:a17577a0ed75a86cea8e579f4405a2942"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6306cfc0359265983842b56b5cf09212"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classvideoSource.html">videoSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a6306cfc0359265983842b56b5cf09212">Create</a> (const char *<a class="el" href="structURI.html">URI</a>, const int argc, char **argv)</td></tr>
<tr class="memdesc:a6306cfc0359265983842b56b5cf09212"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> string and parsing command line arguments.  <a href="#a6306cfc0359265983842b56b5cf09212">More...</a><br /></td></tr>
<tr class="separator:a6306cfc0359265983842b56b5cf09212"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa796136bec7acf354e3e81e5b7c0172a"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classvideoSource.html">videoSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#aa796136bec7acf354e3e81e5b7c0172a">Create</a> (const int argc, char **argv, int positionArg=-1)</td></tr>
<tr class="memdesc:aa796136bec7acf354e3e81e5b7c0172a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface by parsing command line arguments, including the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>.  <a href="#aa796136bec7acf354e3e81e5b7c0172a">More...</a><br /></td></tr>
<tr class="separator:aa796136bec7acf354e3e81e5b7c0172a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac529c5b81c74eb71436e2031a6c1f214"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classvideoSource.html">videoSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#ac529c5b81c74eb71436e2031a6c1f214">Create</a> (const <a class="el" href="classcommandLine.html">commandLine</a> &amp;cmdLine, int positionArg=-1)</td></tr>
<tr class="memdesc:ac529c5b81c74eb71436e2031a6c1f214"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface by parsing command line arguments, including the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>.  <a href="#ac529c5b81c74eb71436e2031a6c1f214">More...</a><br /></td></tr>
<tr class="separator:ac529c5b81c74eb71436e2031a6c1f214"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac254b0c9d38c76c62e6c5f8ad20ef447"><td class="memItemLeft" align="right" valign="top">static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#ac254b0c9d38c76c62e6c5f8ad20ef447">Usage</a> ()</td></tr>
<tr class="memdesc:ac254b0c9d38c76c62e6c5f8ad20ef447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Usage string for command line arguments to <a class="el" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee" title="Create videoSource interface from a videoOptions struct that&#39;s already been filled out...">Create()</a>  <a href="#ac254b0c9d38c76c62e6c5f8ad20ef447">More...</a><br /></td></tr>
<tr class="separator:ac254b0c9d38c76c62e6c5f8ad20ef447"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac080abc0de51300f838596d11b5544a8"><td class="memItemLeft" align="right" valign="top">static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#ac080abc0de51300f838596d11b5544a8">TypeToStr</a> (uint32_t type)</td></tr>
<tr class="memdesc:ac080abc0de51300f838596d11b5544a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a class type to a string.  <a href="#ac080abc0de51300f838596d11b5544a8">More...</a><br /></td></tr>
<tr class="separator:ac080abc0de51300f838596d11b5544a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aaee65d53e3dfb3f4644608c0eebcf833"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#aaee65d53e3dfb3f4644608c0eebcf833">videoSource</a> (const <a class="el" href="structvideoOptions.html">videoOptions</a> &amp;options)</td></tr>
<tr class="separator:aaee65d53e3dfb3f4644608c0eebcf833"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0907f7140f13fa75fef5b23a1f44b55b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#a0907f7140f13fa75fef5b23a1f44b55b">mStreaming</a></td></tr>
<tr class="separator:a0907f7140f13fa75fef5b23a1f44b55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3c05686659fae747ff8709be2c9b445"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structvideoOptions.html">videoOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">mOptions</a></td></tr>
<tr class="separator:aa3c05686659fae747ff8709be2c9b445"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> API is for capturing frames from video input devices such as MIPI CSI cameras, V4L2 cameras, video/images files from disk, directories containing a sequence of images, and from RTP/RTSP network video streams over UDP/IP. </p>
<p><a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interfaces are implemented by <a class="el" href="classgstCamera.html" title="MIPI CSI and V4L2 camera capture using GStreamer and nvarguscamerasrc or v4l2src elements. ">gstCamera</a>, <a class="el" href="classgstDecoder.html" title="Hardware-accelerated video decoder for Jetson using GStreamer. ">gstDecoder</a>, and <a class="el" href="classimageLoader.html" title="Load an image or set of images from disk into GPU memory. ">imageLoader</a>. The specific implementation is selected at runtime based on the type of resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>.</p>
<p><a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> supports the following protocols and resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>'s: </p><pre class="fragment">-  `csi://0` for MIPI CSI cameras, where `0` can be replaced with the camera port.
   It is also assumed that if a number with no protocol is specified (e.g. `"0"`),
   this means to use the MIPI CSI camera of that number (`"0"` -&gt; `csi://0`).

- `v4l2:///dev/video0` for V4L2 cameras, where `/dev/video0` can be replaced with
   a different video device (e.g. `v4l2:///dev/video1` for V4L2 video device `1`).
   If no protocol is specified but the string begins with `/dev/video`, then it is
   assumed that the protocol is V4L2 (`/dev/video0` -&gt; `v4l2:///dev/video0`)

- `rtp://@:1234` to recieve an RTP network stream, where `1234` is the port and `@` is shorthand
   for localhost.  `@` can also be substituted for the IP address of a multicast group.
   Note that it is important to manually specify the codec of the stream when using RTP,
   as the codec cannot be discovered from the RTP stream itself and need to be provided.
   @see videoOptions for more info about the `--input-codec` option.

- `rtsp://username:password@&lt;remote-host&gt;:1234` to subscribe to an RTSP network stream, where
   `&lt;remote-host&gt;` should be substituted for the remote host's IP address or hostname, and 
   `1234` is the port.  For example, `rtsp://192.168.1.2:5000`.  The `username` and `password` 
   are optional, and are only used for RTSP streams that require authentication.

- `file:///home/user/my_video.mp4` for disk-based videos, images, and directories of images.
   You can leave off the `file://` protocol identifier and it will be deduced from the path.
   It can be a relative or absolute path.  If a directory is specified that contains images,
   those images will be loaded in sequence (sorted alphanumerically).  The path can also
   contain wildcard characters, for example `"images/*.jpg"` - however when using wildcards
   from the command line, enclose the string in quotes otherwise the OS will pre-expand them.
   Supported video formats for loading include MKV, MP4, AVI, and FLV. Supported codecs for 
   decoding include H.264, H.265, VP8, VP9, MPEG-2, MPEG-4, and MJPEG. Supported image formats
   for loading include JPG, PNG, TGA, BMP, GIF, PSD, HDR, PIC, and PNM (PPM/PGM binary).
</pre><dl class="section see"><dt>See also</dt><dd><a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> for info about resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> formats. </dd>
<dd>
<a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> for additional options and command-line arguments. </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2cae1095df64b7c61de77935b77032bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2cae1095df64b7c61de77935b77032bb">&#9670;&nbsp;</a></span>~videoSource()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual videoSource::~videoSource </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destroy interface and release all resources. </p>

</div>
</div>
<a id="aaee65d53e3dfb3f4644608c0eebcf833"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaee65d53e3dfb3f4644608c0eebcf833">&#9670;&nbsp;</a></span>videoSource()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">videoSource::videoSource </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structvideoOptions.html">videoOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a872a7d5353b1cd97d02eb403ef8b57eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a872a7d5353b1cd97d02eb403ef8b57eb">&#9670;&nbsp;</a></span>Capture() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool videoSource::Capture </td>
          <td>(</td>
          <td class="paramtype">T **&#160;</td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>timeout</em> = <code>UINT64_MAX</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Capture the next image from the video stream. </p>
<p>The image formats supported by this templated version of <a class="el" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb" title="Capture the next image from the video stream. ">Capture()</a> include the following:</p>
<ul>
<li>uchar3 (<code>IMAGE_RGB8</code>)</li>
<li>uchar4 (<code>IMAGE_RGBA8</code>)</li>
<li>float3 (<code>IMAGE_RGB32F</code>)</li>
<li>float4 (<code>IMAGE_RGBA32F</code>)</li>
</ul>
<p>The image format will automatically be deduced from these types. If other types are used with this overload, a static compile-time error will be asserted.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">image</td><td>output pointer that will be set to the memory containing the image. If this interface has it's <a class="el" href="structvideoOptions.html#afff91aa102908923622328e9f3ca3b83" title="If true, indicates the buffers are allocated in zeroCopy memory that is mapped to both the CPU and GP...">videoOptions::zeroCopy</a> flag set to true, the memory was allocated in mapped CPU/GPU memory and is be accessible from both CPU and CUDA. Otherwise, it's accessible only from CUDA.</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>timeout in milliseconds to wait to capture the image before returning. A timeout value of <code>UINT64_MAX</code> (the default) will wait forever, and a timeout of 0 will return instantly if a frame wasn't immediately ready.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if a frame was captured, <code>false</code> if there was an error or a timeout occurred. </dd></dl>

</div>
</div>
<a id="a81bf11e5819d747eb9060a71e78fce75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81bf11e5819d747eb9060a71e78fce75">&#9670;&nbsp;</a></span>Capture() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool videoSource::Capture </td>
          <td>(</td>
          <td class="paramtype">void **&#160;</td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a>&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>timeout</em> = <code>UINT64_MAX</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Capture the next image from the video stream. </p>
<p>The image formats supported by <a class="el" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb" title="Capture the next image from the video stream. ">Capture()</a> are <code>IMAGE_RGB8</code> (uchar3), <code>IMAGE_RGBA8</code> (uchar4), <code>IMAGE_RGB32F</code> (float3), and <code>IMAGE_RGBA32F</code> (float4). </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__imageFormat.html#ga931c48e08f361637d093355d64583406" title="The imageFormat enum is used to identify the pixel format and colorspace of an image. ">imageFormat</a> for more info.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">image</td><td>output pointer that will be set to the memory containing the image. If this interface has it's <a class="el" href="structvideoOptions.html#afff91aa102908923622328e9f3ca3b83" title="If true, indicates the buffers are allocated in zeroCopy memory that is mapped to both the CPU and GP...">videoOptions::zeroCopy</a> flag set to true, the memory was allocated in mapped CPU/GPU memory and is be accessible from both CPU and CUDA. Otherwise, it's accessible only from CUDA.</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>timeout in milliseconds to wait to capture the image before returning. A timeout value of <code>UINT64_MAX</code> (the default) will wait forever, and a timeout of 0 will return instantly if a frame wasn't immediately ready.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if a frame was captured, <code>false</code> if there was an error or a timeout occurred. </dd></dl>

<p>Implemented in <a class="el" href="classgstCamera.html#afb2ece71edfbd233b8a84d93c8fbcab4">gstCamera</a>, <a class="el" href="classimageLoader.html#a4c00ad180f648a1d60478dfd1057db6f">imageLoader</a>, and <a class="el" href="classgstDecoder.html#a3dc37f6265705bbfff61c9e6cea26e61">gstDecoder</a>.</p>

</div>
</div>
<a id="a19ed8f98e4ce28462296b498804005ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19ed8f98e4ce28462296b498804005ae">&#9670;&nbsp;</a></span>Close()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void videoSource::Close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stop streaming the device. </p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classvideoSource.html#a19ed8f98e4ce28462296b498804005ae" title="Stop streaming the device. ">Close()</a> is automatically called by the <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> destructor when it gets deleted, so you do not explicitly need to call <a class="el" href="classvideoSource.html#a19ed8f98e4ce28462296b498804005ae" title="Stop streaming the device. ">Close()</a> before exiting the program if you delete your <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> object. </dd></dl>

<p>Reimplemented in <a class="el" href="classgstCamera.html#a8798df5c10fff5ecbaf2598816c94f55">gstCamera</a>, <a class="el" href="classimageLoader.html#ac06b32600a172fc0107ffe8240a13cb4">imageLoader</a>, and <a class="el" href="classgstDecoder.html#a88ba5cb4519d8d50aaa3e28c9bf2c8f1">gstDecoder</a>.</p>

</div>
</div>
<a id="aadf5947b119db934f02fefcd8ffe23ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadf5947b119db934f02fefcd8ffe23ee">&#9670;&nbsp;</a></span>Create() <span class="overload">[1/6]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classvideoSource.html">videoSource</a>* videoSource::Create </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structvideoOptions.html">videoOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a <a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> struct that's already been filled out. </p>
<p>It's expected that the supplied <a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> already contain a valid resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>. </p>

</div>
</div>
<a id="ac84b9d20c628c19e0463aca50ed2cdf9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac84b9d20c628c19e0463aca50ed2cdf9">&#9670;&nbsp;</a></span>Create() <span class="overload">[2/6]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classvideoSource.html">videoSource</a>* videoSource::Create </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>URI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structvideoOptions.html">videoOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>options</em> = <code><a class="el" href="structvideoOptions.html">videoOptions</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> string and optional <a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a>. </p>
<dl class="section see"><dt>See also</dt><dd>the documentation above and the <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> struct for more info about resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>'s. </dd></dl>

</div>
</div>
<a id="a17577a0ed75a86cea8e579f4405a2942"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17577a0ed75a86cea8e579f4405a2942">&#9670;&nbsp;</a></span>Create() <span class="overload">[3/6]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classvideoSource.html">videoSource</a>* videoSource::Create </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>URI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcommandLine.html">commandLine</a> &amp;&#160;</td>
          <td class="paramname"><em>cmdLine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> string and parsing command line arguments. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> for valid command-line arguments to be parsed. </dd>
<dd>
the documentation above and the <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> struct for more info about resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>'s. </dd></dl>

</div>
</div>
<a id="a6306cfc0359265983842b56b5cf09212"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6306cfc0359265983842b56b5cf09212">&#9670;&nbsp;</a></span>Create() <span class="overload">[4/6]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classvideoSource.html">videoSource</a>* videoSource::Create </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>URI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface from a resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> string and parsing command line arguments. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> for valid command-line arguments to be parsed. </dd>
<dd>
the documentation above and the <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> struct for more info about resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>'s. </dd></dl>

</div>
</div>
<a id="aa796136bec7acf354e3e81e5b7c0172a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa796136bec7acf354e3e81e5b7c0172a">&#9670;&nbsp;</a></span>Create() <span class="overload">[5/6]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classvideoSource.html">videoSource</a>* videoSource::Create </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>positionArg</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface by parsing command line arguments, including the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">positionArg</td><td>indicates the positional argument number in the command line of the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> (or <code>-1</code> if a positional argument isn't used, and should instead be parsed from the <code>--input=</code> option). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> for valid command-line arguments to be parsed. </dd>
<dd>
the documentation above and the <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> struct for more info about resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>'s. </dd></dl>

</div>
</div>
<a id="ac529c5b81c74eb71436e2031a6c1f214"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac529c5b81c74eb71436e2031a6c1f214">&#9670;&nbsp;</a></span>Create() <span class="overload">[6/6]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classvideoSource.html">videoSource</a>* videoSource::Create </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcommandLine.html">commandLine</a> &amp;&#160;</td>
          <td class="paramname"><em>cmdLine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>positionArg</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create <a class="el" href="classvideoSource.html" title="The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...">videoSource</a> interface by parsing command line arguments, including the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">positionArg</td><td>indicates the positional argument number in the command line of the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> (or <code>-1</code> if a positional argument isn't used, and should instead be parsed from the <code>--input=</code> option). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> for valid command-line arguments to be parsed. </dd>
<dd>
the documentation above and the <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> struct for more info about resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a>'s. </dd></dl>

</div>
</div>
<a id="a4e6ac667bd17a49cc94a6b16173a06ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e6ac667bd17a49cc94a6b16173a06ba">&#9670;&nbsp;</a></span>GetFrameRate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t videoSource::GetFrameRate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the framerate, in Hz or FPS. </p>

</div>
</div>
<a id="a6ca24054da683cae18b0bfad01dbf1d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ca24054da683cae18b0bfad01dbf1d0">&#9670;&nbsp;</a></span>GetHeight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t videoSource::GetHeight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the height of the stream, in pixels. </p>

</div>
</div>
<a id="a7d423829515c5c91d132f476213e22bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d423829515c5c91d132f476213e22bd">&#9670;&nbsp;</a></span>GetOptions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structvideoOptions.html">videoOptions</a>&amp; videoSource::GetOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the <a class="el" href="structvideoOptions.html" title="The videoOptions struct contains common settings that are used to configure and query videoSource and...">videoOptions</a> of the stream. </p>

</div>
</div>
<a id="a2052b0b41222c17e3d14964f10c3ffa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2052b0b41222c17e3d14964f10c3ffa6">&#9670;&nbsp;</a></span>GetResource()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structURI.html">URI</a>&amp; videoSource::GetResource </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the resource <a class="el" href="structURI.html" title="Resource URI of a video device, IP stream, or file/directory. ">URI</a> of the stream. </p>

</div>
</div>
<a id="a76f6f92cf40ad72e9d7f76538d583e37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76f6f92cf40ad72e9d7f76538d583e37">&#9670;&nbsp;</a></span>GetType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint32_t videoSource::GetType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the interface type of the stream. </p>
<p>This could be one of the following values:</p>
<ul>
<li><a class="el" href="classgstCamera.html#a9e83835ff04fb08ecef14a67efb5c3d5" title="Unique type identifier of gstCamera class. ">gstCamera::Type</a></li>
<li><a class="el" href="classgstDecoder.html#a4ae2851033f43b2e70cb8f13f4331ac3" title="Unique type identifier of gstDecoder class. ">gstDecoder::Type</a></li>
<li><a class="el" href="classimageLoader.html#a7ce41945601da456d9ea85324a4b90c0" title="Unique type identifier of imageLoader class. ">imageLoader::Type</a> </li>
</ul>

<p>Reimplemented in <a class="el" href="classgstCamera.html#a40bdf4c4b7675e33bf670df07918e9c6">gstCamera</a>, <a class="el" href="classimageLoader.html#a4b196ca1c23d9322d5b9bba6e05e0bdf">imageLoader</a>, and <a class="el" href="classgstDecoder.html#ad9c4a4b64c50f8ae8712e3061e8a18df">gstDecoder</a>.</p>

</div>
</div>
<a id="a17f0c43e832d4de85a014b3aa4265732"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17f0c43e832d4de85a014b3aa4265732">&#9670;&nbsp;</a></span>GetWidth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t videoSource::GetWidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the width of the stream, in pixels. </p>

</div>
</div>
<a id="a0ce18fd4c3a8f934e7ec000f0d36b7e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ce18fd4c3a8f934e7ec000f0d36b7e9">&#9670;&nbsp;</a></span>IsStreaming()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool videoSource::IsStreaming </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check if the device is actively streaming or not. </p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the device is streaming (open), or <code>false</code> if it's closed or has reached EOS (End Of Stream). </dd></dl>

</div>
</div>
<a id="a0883cf58cd0d8d0c05fb192a01250b7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0883cf58cd0d8d0c05fb192a01250b7a">&#9670;&nbsp;</a></span>IsType() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool videoSource::IsType </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check if this stream is of a particular type. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classvideoSource.html#a76f6f92cf40ad72e9d7f76538d583e37" title="Return the interface type of the stream. ">GetType()</a> for possible values. </dd></dl>

</div>
</div>
<a id="ad3c1689db5baf2786099d2c0be075010"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3c1689db5baf2786099d2c0be075010">&#9670;&nbsp;</a></span>IsType() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool videoSource::IsType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check if a this stream is of a particular type. </p>
<p>Can be used with <a class="el" href="classgstCamera.html" title="MIPI CSI and V4L2 camera capture using GStreamer and nvarguscamerasrc or v4l2src elements. ">gstCamera</a>, <a class="el" href="classgstDecoder.html" title="Hardware-accelerated video decoder for Jetson using GStreamer. ">gstDecoder</a>, and <a class="el" href="classimageLoader.html" title="Load an image or set of images from disk into GPU memory. ">imageLoader</a>. For example:</p>
<p>if( stream-&gt;<a class="el" href="classvideoSource.html#a0883cf58cd0d8d0c05fb192a01250b7a" title="Check if this stream is of a particular type. ">IsType&lt;gstCamera&gt;()</a> ) gstCamera* camera = (gstCamera*)stream; // safe to cast </p>

</div>
</div>
<a id="aa7907ba2392b6ea5f747409d1bfbc18b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7907ba2392b6ea5f747409d1bfbc18b">&#9670;&nbsp;</a></span>Open()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool videoSource::Open </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Begin streaming the device. </p>
<p>After <a class="el" href="classvideoSource.html#aa7907ba2392b6ea5f747409d1bfbc18b" title="Begin streaming the device. ">Open()</a> is called, frames from the device will begin to be captured.</p>
<p><a class="el" href="classvideoSource.html#aa7907ba2392b6ea5f747409d1bfbc18b" title="Begin streaming the device. ">Open()</a> is not stricly necessary to call, if you call one of the <a class="el" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb" title="Capture the next image from the video stream. ">Capture()</a> functions they will first check to make sure that the stream is opened, and if not they will open it automatically for you.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> if an error occurred opening the stream. </dd></dl>

<p>Reimplemented in <a class="el" href="classgstCamera.html#a28f4842c5648a253a1acee5276ac8486">gstCamera</a>, <a class="el" href="classimageLoader.html#a1af7d6e4e3ad6232c67dcc1307509677">imageLoader</a>, and <a class="el" href="classgstDecoder.html#aab54dc71e937ed3e8ecd6fd129e16179">gstDecoder</a>.</p>

</div>
</div>
<a id="a38909f4451ecdf3a2777aea3a088677e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38909f4451ecdf3a2777aea3a088677e">&#9670;&nbsp;</a></span>TypeToStr() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char* videoSource::TypeToStr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert this stream's class type to string. </p>

</div>
</div>
<a id="ac080abc0de51300f838596d11b5544a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac080abc0de51300f838596d11b5544a8">&#9670;&nbsp;</a></span>TypeToStr() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static const char* videoSource::TypeToStr </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert a class type to a string. </p>

</div>
</div>
<a id="ac254b0c9d38c76c62e6c5f8ad20ef447"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac254b0c9d38c76c62e6c5f8ad20ef447">&#9670;&nbsp;</a></span>Usage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static const char* videoSource::Usage </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Usage string for command line arguments to <a class="el" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee" title="Create videoSource interface from a videoOptions struct that&#39;s already been filled out...">Create()</a> </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa3c05686659fae747ff8709be2c9b445"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3c05686659fae747ff8709be2c9b445">&#9670;&nbsp;</a></span>mOptions</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structvideoOptions.html">videoOptions</a> videoSource::mOptions</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a0907f7140f13fa75fef5b23a1f44b55b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0907f7140f13fa75fef5b23a1f44b55b">&#9670;&nbsp;</a></span>mStreaming</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool videoSource::mStreaming</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>jetson-utils/<a class="el" href="videoSource_8h_source.html">videoSource.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classvideoSource.html">videoSource</a></li>
    <li class="footer">Generated on Tue Jul 14 2020 21:59:35 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
